﻿using System;
using System.Collections.Generic;
using System.Text;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.IO;
using System.Diagnostics;

namespace iTextSharp.console.test
{
    class Program
    {
        static void Main(string[] args)
        {
            const string outputFile = "HelloWorld.pdf";

            using (var output = new FileStream(outputFile, FileMode.OpenOrCreate))
            {
                Document doc = new Document();
                PdfWriter writer = PdfWriter.GetInstance(doc, output);

                doc.Open();

                Paragraph para = new Paragraph("Hello, World!",
                    new Font(Font.COURIER, 10));
                doc.Add(para);

                doc.Close();
            }

            Process.Start(outputFile);
        }
    }
}
